"""
    This module will describe the data model behind the CodeBlogger application.
"""

__all__ = ['BlogEntry', 'Entry', 'CommentEntry']

from google.appengine.ext import db

class Entry(db.Model):
    title = db.StringProperty()
    markdown = db.TextProperty()
    html = db.TextProperty()
    create_date = db.DateTimeProperty(auto_now_add=True)
    mod_date = db.DateTimeProperty(auto_now_add=True)

class BlogEntry(Entry):
    author = db.UserProperty()
    
class CommentEntry(Entry):
    blog = db.ReferenceProperty(BlogEntry)
    name = db.TextProperty()
    #parentComment = db.ReferenceProperty(CommentEntry)
    #We will add nested comments later.
    
